import os
files = os.listdir("home")

datas = {"articles":[]}
for f in files:
    data = {"title":f,"url":"home/"+f,"image":"html/txt.png"}
    datas["articles"].append(data)

import json
with open("html/searching.json","w",encoding="utf8") as f:
    json.dump(datas,f)